
import 'dart:io';

import 'package:chewie/chewie.dart';
import 'package:flutter/cupertino.dart';
import 'package:video_player/video_player.dart';

final videoPlayerController = VideoPlayerController.file(
    File("/storage/emulated/0/Android/data/com.example.flutter_hotworkfj/files/Pictures/42aa9e31-1143-4933-92da-69753cf1c2045307323845904293241.mp4"));

final chewieController = ChewieController(
  videoPlayerController: videoPlayerController,
  aspectRatio: 1,
  autoPlay: true,
  looping: true,
);

final playerWidget = Chewie(
  controller: chewieController,
);


class VidoPlayChewie extends StatefulWidget{
  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return _VideoState();
  }


}
class _VideoState extends State{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return playerWidget;
  }
  @override
  void dispose() {
    videoPlayerController.dispose();
    chewieController.dispose();
    super.dispose();
  }
}